package com.mydemo.design_pattern.action_type.observer_pattern.jdk;

import java.util.Observable;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: MyObservable, v1.0 2019-09-23 17:34 liming1 Exp $
 */
public class MyObservable extends Observable {
    public static void main(String[] args) {
        MyObservable myObservable = new MyObservable();
        BigObserver bigObserver = new BigObserver();
        SmallObserver smallObserver = new SmallObserver();
        myObservable.addObserver(bigObserver);
        myObservable.addObserver(smallObserver);
        myObservable.setChanged();
        myObservable.notifyObservers("嘻嘻");
    }
}
